%
% interp_matrix_p.m
%
%   Form the interpolation matrix for the pressure
%   which is stored at the cell centers
%
%   input -- Nx number of cells in x-direction, fine grid
%            Ny number of cells in the y-direction, fine grid
%   output
%
function Ip = interp_matrix_p(Nx,Ny,nVoffset)

% form two one-dimensional interpolation matricies
%
if abs(nVoffset)==1
    Ipx = nc_nm_interp1(Nx, nVoffset);
    Ipy = nc_nm_interp1(Ny, nVoffset);
elseif nVoffset==0
    Ipx = cc_nm_interp1(Nx);
    Ipy = cc_nm_interp1(Ny);
else
    error('unsupported nVoffset!');
end

% assemble the matrix for the two-dimensional problem
%   note the x-y ordering in kron corresponds to the order in meshgrid
%
Ip = kron(Ipx,Ipy);

